﻿<%@ Page Title="Новости" Language="C#" MasterPageFile="~/Site.master" 
AutoEventWireup="true" CodeFile="News.aspx.cs" Inherits="Tracks" %>

<asp:Content ID="forMainContent" runat="server" ContentPlaceHolderID="mainContent">
<asp:LoginView ID="BeatMakerLoginView" runat="server">
                                <RoleGroups>
                                    <asp:RoleGroup Roles="Administrator">
                                        <ContentTemplate>
                                            <a href="AddNews.aspx">Добавить новую новость!</a><br /><br />
                                        </ContentTemplate>
                                    </asp:RoleGroup>
                                </RoleGroups>
                            </asp:LoginView>
    Список новостей:
    <br />
    <br />
    <asp:Label ID="aboutNullMess" runat="server" Text=""></asp:Label>
    <asp:ListView ID="listNews" runat="server">
    <ItemTemplate>
            => <a href='OneNews.aspx?id=<%#Eval("NewsID") %>'><%#Eval("Title") %></a><br />
            <br />
    </ItemTemplate>
    <ItemSeparatorTemplate>
        <hr />
    </ItemSeparatorTemplate>
    </asp:ListView>

      <br />

    <asp:DataPager ID="MessGbookDataPager" PagedControlID="listNews" runat="server">
        <Fields>
            <asp:NextPreviousPagerField ShowLastPageButton="false" PreviousPageText="Назад" 
                ShowNextPageButton="False"  />
            <asp:NumericPagerField />
            <asp:NextPreviousPagerField NextPageText="Далее" 
                ShowPreviousPageButton="False" />
        </Fields>
    </asp:DataPager>
</asp:Content>


